module.exports = app => {
  const roleController = require("../controllers/role.controller.js")
  var router = require("express").Router()
  // 查找所有用户
  router.get("/list", roleController.getList)
  // 创建用户
  router.post("/", roleController.create)
  // 查找用户
  router.get("/", roleController.getDetail)
  // 更新用户
  router.post("/update", roleController.update)
  // 删除用户
  router.post("/delete", roleController.delete)
  
  app.use('/api/role', router)
};